//app.js
App({
  onLaunch: function() {
    wx.cloud.init({
      env:"xdaisqliot-1g4ucqpdcb12b67a"
    })
    // 获取系统状态栏信息 用于制定导航栏
    wx.getSystemInfo({
      success: e => {
        this.globalData.StatusBar = e.statusBarHeight;
        let custom = wx.getMenuButtonBoundingClientRect();
        this.globalData.Custom = custom;
        this.globalData.CustomBar = custom.bottom + custom.top - e.statusBarHeight;
      }
    })
  },
  getCurrentTime(){
    let getTime=new Date()
    //获取年份
    console.log("年"+getTime.getFullYear())
    let year = getTime.getFullYear()

    //获取当前月份 0 - 11 0一月
    // console.log("月"+getTime.getMonth())
    let month = getTime.getMonth()
    month += 1
    console.log("月"+month)

    //获取当月有几天 
    console.log(new Date(year, month, 0).getDate())

    //获取当前号数
    console.log("几号"+getTime.getDate())
    let dayNum = getTime.getDate()

    
    //获取当前星期几 0-6 0:星期天
    console.log("星期几"+getTime.getDay())
    let nowDay = getTime.getDay() 
    console.log(nowDay)
    let showTime = month+"月" + dayNum + "号" + getTime.getHours()+":" + getTime.getMinutes()
    return showTime
  },
  globalData: {
    userInfo: null,
    isChecked:'',
    userId : '',
    addProId : ""
  }
})